/**
 * Main application.
 */
object SampleApp extends Application {

  // Initialize actors
  val summaryActor = new SummaryActor()
  val getPageSizeActor = new GetPageSizeActor(summaryActor)
  val googleSearchActor = new GoogleSearchActor(getPageSizeActor, summaryActor)
  
  // Start the actor threads
  summaryActor.start
  getPageSizeActor.start
  googleSearchActor.start
  
  // Read input from console
  while(true) {
    Console.println("Enter search term and hit enter")
    googleSearchActor ! DoSearch(Console.readLine)
  }

}